import VueRouter from "vue-router";
import Vue from "vue";
Vue.use(VueRouter);


import Home from "@/view/Home";
import SortTable from "@/view/SortTable";
import Disease  from "@/view/Disease";
import Workbench from "@/view/Workbench";
import Login from "@/view/Login"
import AddUser from "@/view/AddUser"
import Department from "@/view/Department"
import AddDepartment from "@/view/AddDepartment"
import Register from "@/view/Register"
import Settlecategory from "@/view/Settlecategory"
import Fmeditem from "@/view/Fmeditem"


const routes = [
    {
        path:'/',
        redirect:'/login'
    },
     {
        //登录
        path: '/Login',
        component: Login,
        meta: {
            title:'登录',
            isLogin: false
        }
    },
    {
        // 
        path: '/',
        meta: { title: '首页' },
        component: { render: (e) => e("router-view") },
        children: [
            {
                path: 'workbench',
                component: Workbench,
                meta: { title: '工作台', isLogin: true },
            },
            {
                path: 'disease',
                name: '诊断目录',
                component: Disease,
                meta: { title: '诊断目录', isLogin: true }
            },
            {
                path: 'sortTable',
                component: SortTable,
                meta: { title: '排班表', isLogin: true }
            },
            {
                path: 'home',
                component: Home,
                name: 'home',
                meta: { title: '首页', isLogin: true }
            }, {
                path: 'department',
                component: Department,
                meta: {
                    title: '科室页面',
                    isLogin: true
                }
            }, {
                path: 'AddDepartment',
                component: AddDepartment,
                meta: {
                    title: '添加科室页面',
                    isLogin: true
                }
            }, {
                path: 'AddUser',
                component: AddUser,
                meta: {
                    title: '添加用户页面',
                    isLogin: true
                }
            }, {
                path: 'Register',
                component: Register,
                meta: {
                    title: '挂号管理界面',
                    isLogin: true
                }
            }, {
                path: 'Settlecategory',
                component: Settlecategory,
                meta: {
                    title: '结算类别管理界面',
                    isLogin: true
                }
            },{
                path: 'Fmeditem',
                component: Fmeditem,
                meta: {
                    title: '非药品收费管理界面',
                    isLogin: true
                }
            }
        ]
    }
]





export default new VueRouter({ routes })